<?php

namespace App\Think\Sdk;

use App\Think\Org\Email;
use App\Think\Config;

//短信宝

class Ems{

	//发送邮件
	public static function send($param){
	    $config = Config::get('Site');
        $cls = new Email($config);//\app\common\library\Email::instance();
        $res = $cls
            ->from($config['mail_from'], '宝特科技')
            ->to($param['email'])
            ->subject('【宝特】验证码')
            ->message("您的验证码是：" . $param['code'])
            ->send();
        
        //异步任务
        // $task = \EasySwoole\EasySwoole\Task\TaskManager::getInstance();
        // $res = $task->async(new \App\Task\EmailTask(['name'=>'仙士可2号']));
        return $res;
	}


}
